package com.gyg.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class ThreadPoolService2 {
    /**
     * 执行异步任务
     * 使用注解@Async指定使用哪个线程池
     */
    @Async("customAsyncThreadPool")
    public void executeAsync2() {
        log.info("executeAsync2...当前线程名：" + Thread.currentThread().getName());
    }
}
